package ooday01;

public class Car {//自己创造的一种数据类型
    //成员变量--------描述对象的属性
    String brand;
    String color;
    double price;
    int capacity;

    Car() {

    }

    Car(String brand, String color, double price, int capacity) {
        this.brand = brand;
        this.color = color;
        this.price = price;
        this.capacity = capacity;
    }

    //方法-------描述对象的行为
    void start(){
        System.out.println(brand+"牌子的"+color+"色的"+capacity+"座的"+price+"块钱的车启动了.....");
    }
    void run(){
        System.out.println(brand+"牌子的"+color+"色的"+capacity+"座的"+price+"块钱的车跑起来了.....");
    }
    void stop(){
        System.out.println(brand+"牌子的"+color+"色的"+capacity+"座的"+price+"块钱的车停了了.....");
    }
}
